function ValidaCEP(campo)
{
  if (campo.value != '') {
     var CEP = SoNumero(campo.value);

	 if (CEP == '00000000'
	  || CEP == '11111111'
	  || CEP == '22222222'
	  || CEP == '33333333'
	  || CEP == '44444444'
	  || CEP == '55555555'
	  || CEP == '66666666'
	  || CEP == '77777777'
	  || CEP == '88888888'
	  || CEP == '99999999')
	 	return false;

     return true;
    }  
}

function MascaraCEP(campo,w)
{
    var strCheck = '0123456789';
    var whichCode = (window.Event) ? w.which : w.keyCode;
    var key = String.fromCharCode(whichCode);
	var CEP = SoNumero(campo.value);
	var CEPAux = '';
	
	if (strCheck.indexOf(key) == -1) w.returnValue = false;
	
	if (whichCode != 8 && CEP.length < 9)
	{
		for (var i=0; i< CEP.length; i++)
		{
			CEPAux = CEPAux + CEP.substr(i,1);
			if (i == 1)
			{
				CEPAux = CEPAux + ".";
			} else if (i == 4)
			{
				CEPAux = CEPAux + "-";
			}
		}
		campo.value = CEPAux;
	}
	else
	{
		campo.value = campo.value.substr(0,9);
	}
}